home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue67 / construc / Unit1.pas < prev   
Encoding:
Pascal/Delphi Source File  |  2001-01-31  |  974 b   |  47 lines

  1. unit Unit1;
  2. {$DEFINE CALLBACK}
  3. interface
  4. uses
  5.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Corba,
  6.   DrBob42_i, DrBob42_s, DrBob42_impl;
  7.  
  8. type
  9.   TForm1 = class(TForm)
  10.     procedure FormCreate(Sender: TObject);
  11.   private
  12.   { private declarations }
  13.   protected
  14.   { protected declarations }
  15.     Rate: Rates; // skeleton object
  16.     Account: Accounts; // skeleton object
  17.     procedure InitCorba;
  18.   public
  19.   { public declarations }
  20.   end;
  21.  
  22. var
  23.   Form1: TForm1;
  24.  
  25. implementation
  26. {$R *.DFM}
  27.  
  28. procedure TForm1.InitCorba;
  29. begin
  30.   CorbaInitialize;
  31.   // Add CORBA server Code Here
  32. {$IFNDEF CALLBACK}
  33.   Rate := TRatesSkeleton.Create('Rates', TRates.Create);
  34.   BOA.ObjIsReady(Rate as _Object);
  35. {$ENDIF}
  36.   Account := TAccountsSkeleton.Create('Accounts', TAccounts.Create);
  37.   BOA.ObjIsReady(Account as _Object);
  38. //  BOA.ImplIsReady;
  39. end;
  40.  
  41. procedure TForm1.FormCreate(Sender: TObject);
  42. begin
  43.   InitCorba;
  44. end;
  45.  
  46. end.
  47.